1
/****************************** Module Header ******************************\
2 * Module Name: ReadNumberActivity.cs
3 * Project: CSWF4FlowChart
4 * Copyright (c) Microsoft Corporation.
6 * The class defines the ReadNumber activity.
8 * This source is subject to the Microsoft Public License.
9 * See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
10 * All other rights reserved.
12 * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
13 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
15 \***************************************************************************/
18 using System
.Activities
;
21 namespace CSWF4FlowChart
23 public sealed class ReadNumberActivity
: CodeActivity
25 // Define an activity out argument of type int
26 public OutArgument
<int> playerInputNumber { get; set; }
28 protected override void Execute(CodeActivityContext context
)
30 playerInputNumber
.Set(context
, Int32
.Parse(Console
.ReadLine()));